<% form_for @user, :url => form_path do |f| -%>
<%= f.error_messages %>
  <p>
    <%= f.label :name, 'Nome Completo' %><br/>
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :email, 'E-mail' %><br/>
    <%= f.text_field :email %>
  </p>
  <p>
    <%= f.label :cpf, 'CPF' %><br/>
    <%= f.text_field :cpf, :alt => :cpf %>
  </p>
  <p>
    <%= f.label :matricula, 'Matrícula Siape' %><br/>
    <%= f.text_field :matricula, :alt => :matricula %>
  </p>
  <p>
    <%= f.label :roles, 'Cargo/Função' %><br/>
    <%= collection_select :user, :roles, User::ROLES, :to_s, :capitalize, {}, :multiple => true %>
  </p>
  <% if pass -%>
    <p>
      <%= f.label :password, 'Senha' %><br/>
      <%= f.password_field :password %>
    </p>
    <p>
      <%= f.label :password_confirmation, 'Confirmar senha' %><br/>
      <%= f.password_field :password_confirmation %>
    </p>
  <% end -%>
  <p>
    <%= f.submit 'Salvar conta' %>
  </p>
<% end -%>